export function formatMDate(date) {
  var d = eval('new ' + date.substr(1, date.length - 2));

  var ar_date = [d.getFullYear(), d.getMonth() + 1, d.getDate()];

  for (var i = 0; i < ar_date.length; i++) ar_date[i] = dFormat(ar_date[i]);
  return ar_date.join('-');
}
function dFormat(i) {
  return i < 10 ? '0' + i.toString() : i;
}
